#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include <string.h>
#include <sys/mman.h>
#include <assert.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>

using namespace std;
using namespace cv;

//	Mat img2;
//	 ROTATE_90_CLOCKWISE = 0, //!<Rotate 90 degrees clockwise
//	    ROTATE_180 = 1, //!<Rotate 180 degrees clockwise
//	    ROTATE_90_COUNTERCLOCKWISE = 2, /

int main() {
	Mat img = imread("in.jpg", IMREAD_UNCHANGED);
	rotate(img,img2, ROTATE_90_CLOCKWISE);
	imwrite("out.jpg", img2);
	return 0;
}

